/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufscar.compiladores.ast;

import java.util.ArrayList;
import java.util.Collection;

public class ExprList {
    
    private Collection<Expr> expList;
    
    public ExprList() {
        expList = new ArrayList<Expr>();
    }

    public void addElement(Expr expr) {
        expList.add(expr);
    }

    public void genC(PW pw) {
        int size = expList.size();
        for(Expr e : expList){
            e.genC(pw, false);
            if (--size > 0) {
                pw.out.print(", ");
            }
        }
    }
    
}